<?php
class cConexion{
private $con;
public function conectar(){
	$this->con=mysql_connect("localhost","root","") or die(mysql_error());
	mysql_select_db("ebanistas",$this->con) or die(mysql_error());
}
public function desconectar(){
$res=mysql_close($this->con);
if(!res){
	die("Error al cerra la conexion".mysql_error());
}
}
public function ejecutar($query){
$res=mysql_query($query,$this->con);
if(!res)
	die("Error al ejecutar".mysql_error());
return $res;
}

}
?>